import * as _ from 'lodash';
const cloneDeep = _.cloneDeep;
let mixin = {
    data () {
        return {
            result: {
                mapList: []
            },
            
            currObj: {
                visualMapMax: 100
            }
            
        };
    },
    computed: {
        
    },
    watch: {
    },
    methods: {
        _getChinaEcharts () {
            return this.axios
                .post("/ctepapi/admin-api/eval/publish-rank/province/organ/count").then((resp) => {
                    let { errno, errmsg, data } = resp.data;
                    if (errno * 1 !== 0) {
                        let maxs = data[0].count || 100;
                        this.result.mapList  = data.map((n) => {
                            let nameVal = n.province.replace(/省/g, '');
                            maxs = Math.max(maxs, n.count)
                            return {
                                name:  nameVal,
                                value: n.count
                            }
                        });
                        this.currObj.visualMapMax = maxs;
                    }
                })
        },
    },
    created () {
    }
};


export {
    mixin,
};
